import api from "../utils/api";
import {Toast} from 'antd-mobile-rn';
export default {

    getUserInfo:async ()=>{
        return api({url:"/user/getUser"}).then(data=>data.result);
    },
    update:async (user)=>{
        Toast.loading("操作中...",0);
        return api({
            url:"/user/update",
            method:"POST",
            body:user
        }).then(data=>{
            Toast.hide();
            return data;
        }).catch((e)=>{
            Toast.info("操作失败,请重试");
        })

    }
}